#ifndef __M_VIDEO_H__
#define __M_VIDEO_H__

#include <stdint.h>
#include <stddef.h>

#include <vita2d.h>
#include "vita2d_ext.h"

void retroVideoRefreshCallback(const void *data, unsigned width, unsigned height, size_t pitch);
int vitaVideoInit();
int vitaVideoShutdown();
void vitaVideoDrawFrame();
void vitaVideoDraw();

void vitaVideoPause();
void vitaVideoResume();

int vitaVideoCreatVideoTexture();

int vitaVideoRefresh();

int vitaVideoIsVideoNeedRefresh();
void vitaVideoSetVideoNeedRefresh(int enable);

float vitaVideoGetFpsScale();
void vitaVideoSetFpsScale(float scale);

unsigned int vitaVideoGetFrameWidth();
unsigned int vitaVideoGetFrameHeight();

vita2d_shader *vitaVideoGetVideoShader();
vita2d_texture *vitaVideoGetVideoTexture();
void *vitaVideoGetVideoTextureDatap();
unsigned int vitaVideoGetVideoTextureWidth();
unsigned int vitaVideoGetVideoTextureHeight();
unsigned int vitaVideoGetVideoTextureStride();
unsigned int vitaVideoGetVideoTextureBytespp();

float vitaVideoGetVideoRotateRad();
void vitaVideoMakeBaseWH(uint32_t *base_width, uint32_t *base_height);

uint32_t *vitaVideoGetScreenshot(uint32_t *new_width, uint32_t *new_height, uint64_t *new_size);

#endif